package com.scau.clothes.api.stock;


import com.scau.clothes.core.core.entity.AjaxResult;
import com.scau.clothes.stock.vo.LoginUserVo;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("auth")
public class UserAuthController {
    @PostMapping("/login")
    public AjaxResult login(@RequestBody LoginUserVo loginUserVo){
        Map<String, Object> data = new HashMap<>();
        data.put("token","admin-token");
        return AjaxResult.success("登录成功",data);
    }
    @GetMapping("/getInfo")
    public AjaxResult getInfo() {
        Map<String, Object> data = new HashMap<>();
        data.put("roles","admin");
        data.put("name","超级管理员");
        data.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        return AjaxResult.success(data);
    }
    @GetMapping("/logout")
    public AjaxResult logout() {
        return AjaxResult.success("退出成功");
    }
}

